<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false"%>
<html>
<head>
	<title>Title</title>
	<jsp:include page="layout/_import.jsp"></jsp:include>
</head>
<body>
<jsp:include page="layout/_nav.jsp"></jsp:include>
<div class="container">
	<main role="main" class="pb-3">

		<h2>管理您的账户</h2>

		<div>
			<h4>这是您的个人中心</h4>
			<hr>
			<div class="row">
				<div class="col-md-3">
					<ul class="nav nav-pills flex-column">
						<li class="nav-item"><a class="nav-link" id="profile" href="/personal.jsp">用户信息</a></li>
						<li class="nav-item"><a class="nav-link active" id="change-password">密码管理</a></li>
					</ul>
				</div>
				<div class="col-md-9">
					<h4>用户密码</h4>
					<div class="alert alert-success alert-dismissible" role="alert" <c:if test="${empty msg}">hidden</c:if>>
						<button type="button" class="close" data-dismiss="alert" aria-label="Close">
							<span aria-hidden="true">×</span>
						</button>
						${msg}
					</div>
					<div class="row">
						<div class="col-md-6">
							<form method="post" action="/custom">
								<input type="hidden" name="m" value="repwd">
								<input type="hidden" name="id" value="${user.id}">
								<div class="form-group">
									<label for="pwd">新密码</label>
									<input value="${user.pwd}" class="form-control" type="text" data-val="true" data-val-maxlength="长度不能超过10" data-val-maxlength-max="20" data-val-required="密码不能为空" id="pwd" maxlength="10" name="pwd">
									<span class="invalid field-validation-valid" data-valmsg-for="pwd" data-valmsg-replace="true"></span>
								</div>
								<button id="update-profile-button" type="submit" class="btn btn-primary">保存</button>
							</form>
						</div>
					</div>


				</div>
			</div>
		</div>


	</main>
	<script src="https://cdn.bootcss.com/jquery-validate/1.19.1/jquery.validate.min.js"></script>
	<script src="https://cdn.bootcss.com/jquery-validation-unobtrusive/3.2.11/jquery.validate.unobtrusive.min.js"></script>
</div>
</body>
</html>
